package cn.edu.scau.dormitory_management_system.enums;

/**
 * @author vizzk
 * @date 2021/8/9
 * @Description: 审核状态枚举类
 */
public enum ApplicationStatusEnum {
    COMMIT(1,"提交申请"),
    DEPT_AUDIT(2,"学院审核"),
    COLLEGE_AUDIT(3,"学校审核"),
    PASSED(100,"通过审核"),
    FAIL(0,"未通过审核");

    private Integer status;
    private String remark;

    ApplicationStatusEnum(Integer status, String remark){
        this.status = status;
        this.remark = remark;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public static String getRemarkByStatus(Integer status){
        for (ApplicationStatusEnum value : ApplicationStatusEnum.values()) {
            if(status.equals(value.getStatus())){
                return value.getRemark();
            }
        }
        return null;
    }
}
